package Contr2;

public class Factory  {
	ICommandExcutor ie;
		
	ICommandExcutor getExecutor(String cmd){
		if(cmd.equals("dir")){
			 ie=DirCommandExcutor.getInstance();
			 return ie;
			 
		 } else if(cmd.equals("tree")){
			 ie=TreeCommandExcutor.getInstance();
			 return ie;
			 
		 } else if(cmd.equals("find")){			 
			 ie=FindCommandExcutor.getInstance();
			 return ie;
			 
		 } else if(cmd.equals("mkdir")){	
			 ie=MkdirCommandExcutor.getInstance();
			 return ie; 
			 
		 } else if(cmd.equals("copy")){	
			 ie=CopyCommandExcutor.getInstance();
			 return ie;
			 
		 } else if(cmd.equals("move")){	
			 ie=MoveCommandExcutor.getInstance();
			 return ie;
		 } else if(cmd.equals("delete")){	
			 ie=DeleteCommandExcutor.getInstance();
			 return ie;		 	
		 } else if(cmd.equals("help")){	
			 ie=HelpCommandExcutor.getInstance();
			 return ie;
		 } else if(cmd.equals("cd")){	
			 ie=CDCommandExcutor.getInstance();
			 return ie;
		 } else if(cmd.equals("exit")){	
			 ie=ExitCommandExcutor.getInstance();
			 return ie;
		 }
		
		return null;
	}
	

}
